package com.bwda.dsrs.systemservice.controller;


import com.bwda.dsrs.base.centerbase.response.ResponseEntity;
import com.bwda.dsrs.systemservice.annotations.IgnoreClientToken;
import com.bwda.dsrs.systemservice.annotations.NeedRole;
import com.bwda.dsrs.systemservice.domain.exception.SystemServiceException;
import com.bwda.dsrs.systemservice.service.IMailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Mail controller
 *
 * @description:
 * @author: yangjun
 * @create: 2019 -09-02 14:51
 */
@RestController
@RequestMapping("/s/mail")
@IgnoreClientToken
@Api(value = "/s/mail", tags = "邮件发送")
public class MailController extends BaseController {
    /**
     * Mail service
     */
    @Autowired
    IMailService mailService;
//    @Autowired
//    FileOutApi fileOutApi;
    /**
     * Send test response entity
     *
     * @param name name
     * @return the response entity
     * @throws SystemServiceException system service exception
     */

    @NeedRole("sysadminrole")
    @ApiOperation(value = "邮件发送", notes = "邮件发送", httpMethod = "GET")
    @RequestMapping(value = "/sendTest", method = {RequestMethod.GET, RequestMethod.POST})
    public ResponseEntity<String> sendTest(@RequestBody String name) throws SystemServiceException {
        return getSuccessResult();
    }


}